import { Image } from 'antd'

import { pageDesignModel } from '@/models/pageDesignModel'
import { observer } from 'mobx-react-lite'
import { ImageItemType } from '../../../../types/pageDesign'

const ImageItemPreview = (item: ImageItemType) => {
  return <Image onClick={() => pageDesignModel.setCurrentItem(item)} width="100%" src={item.url} preview={false} />
}

export default observer(ImageItemPreview)
